home *** CD-ROM | disk | FTP | other *** search
/ Mac-Source 1994 July / Mac-Source_July_1994.iso / C and C++ / Entertainment / MacMud / Unix / rpc⁄pmap_clnt.h < prev    next >
Encoding:
Text File  |  1988-07-15  |  1.2 KB  |  38 lines  |  [TEXT/????]

  1. /*    @(#)pmap_clnt.h 1.1 86/09/24 SMI    */
  2.  
  3. /*
  4.  * pmap_clnt.h
  5.  * Supplies C routines to get to portmap services.
  6.  *
  7.  * Copyright (C) 1984, Sun Microsystems, Inc.
  8.  */
  9.  
  10. /*
  11.  * Usage:
  12.  *    success = pmap_set(program, version, protocol, port);
  13.  *    success = pmap_unset(program, version);
  14.  *    port = pmap_getport(address, program, version, protocol);
  15.  *    head = pmap_getmaps(address);
  16.  *    clnt_stat = pmap_rmtcall(address, program, version, procedure,
  17.  *        xdrargs, argsp, xdrres, resp, tout, port_ptr)
  18.  *        (works for udp only.) 
  19.  *     clnt_stat = clnt_broadcast(program, version, procedure,
  20.  *        xdrargs, argsp,    xdrres, resp, eachresult)
  21.  *        (like pmap_rmtcall, except the call is broadcasted to all
  22.  *        locally connected nets.  For each valid response received,
  23.  *        the procedure eachresult is called.  Its form is:
  24.  *    done = eachresult(resp, raddr)
  25.  *        bool_t done;
  26.  *        caddr_t resp;
  27.  *        struct sockaddr_in raddr;
  28.  *        where resp points to the results of the call and raddr is the
  29.  *        address if the responder to the broadcast.
  30.  */
  31.  
  32. extern bool_t        pmap_set();
  33. extern bool_t        pmap_unset();
  34. extern struct pmaplist    *pmap_getmaps();
  35. enum clnt_stat        pmap_rmtcall();
  36. enum clnt_stat        clnt_broadcast();
  37. extern u_short        pmap_getport();
  38.